package com.huawei.appgallery.common.media.widget.zoomview;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.util.AttributeSet;
import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import o.blx;
import o.blx.a;
import o.blx.d;
import o.blx.e;

public class ScaleView extends ImageView {
    private final blx ˊ;
    private ScaleType ˏ;

    public ScaleView(Context context) {
        this(context, null);
        setZoomable(false);
    }

    public ScaleView(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, 0);
    }

    public ScaleView(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        super.setScaleType(ScaleType.MATRIX);
        this.ˊ = new blx(this);
        if (this.ˏ != null) {
            setScaleType(this.ˏ);
            this.ˏ = null;
        }
    }

    public void setOnClickListener(OnClickListener onClickListener) {
        this.ˊ.ˎ(onClickListener);
    }

    public ScaleType getScaleType() {
        return this.ˊ.ˊ();
    }

    public void setAllowParentInterceptOnEdge(boolean z) {
        this.ˊ.ˏ(z);
    }

    public void setMinScale(float f) {
        this.ˊ.ˋ(f);
    }

    public void setMaxScale(float f) {
        this.ˊ.ˎ(f);
    }

    public void setmFillSmallScale(float f) {
        this.ˊ.ॱ(f);
    }

    public void setmFillBigScale(float f) {
        this.ˊ.ˏ(f);
    }

    public void setImageDrawable(Drawable drawable) {
        super.setImageDrawable(drawable);
        if (this.ˊ != null) {
            this.ˊ.ʽ();
        }
    }

    public void setImageResource(int i) {
        super.setImageResource(i);
        if (this.ˊ != null) {
            this.ˊ.ʽ();
        }
    }

    public void setImageURI(Uri uri) {
        super.setImageURI(uri);
        if (this.ˊ != null) {
            this.ˊ.ʽ();
        }
    }

    public void setOnMatrixChangeListener(d dVar) {
        this.ˊ.ˋ(dVar);
    }

    public void setOnLongClickListener(OnLongClickListener onLongClickListener) {
        this.ˊ.ॱ(onLongClickListener);
    }

    public void setOnScaleTapListener(e eVar) {
        this.ˊ.ˊ(eVar);
    }

    public void setOnViewTapListener(a aVar) {
        this.ˊ.ˏ(aVar);
    }

    public void setScaleType(ScaleType scaleType) {
        if (this.ˊ != null) {
            this.ˊ.ॱ(scaleType);
        } else {
            this.ˏ = scaleType;
        }
    }

    public void setZoomable(boolean z) {
        this.ˊ.ˋ(z);
    }

    protected void onDetachedFromWindow() {
        this.ˊ.ˎ();
        super.onDetachedFromWindow();
    }

    public void setOriginScale(float f) {
        this.ˊ.ˊ(f);
    }

    public void ˎ() {
        this.ˊ.ʻ();
    }

    public void setHasDrawable(boolean z) {
        this.ˊ.ˎ(z);
    }
}
